<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>fetch</title>
    <style></style>
</head>
<body>
    <button>fetch</button>
</body>
<script>
    let button = document.querySelector("button");
    button.onclick = () => {
        fetch("http://127.0.0.1:8888/fetch-server?vip=8", {
            method: "POST",
            headers: {
                name: "fafa"
            },
            body: "username=admin&password=111111"
        }).then(value => {
            return value.text();
        }).then(value => {
            console.log(value);
        });
    };
</script>
</html>